import { request } from "@/utils/service"

/**
 * @param data 获取同款的列表
 * @returns
 */
export const GetDrawingSameList = (data: { page: number }) => {
  return request<any>({
    url: "/image/list_same",
    method: "POST",
    data
  })
}

/**
 * @param data 获取我的绘画历史
 * @returns
 */
export const GetMyDrawingHistoryList = (data: { page: number }) => {
  return request<any>({
    url: "/image/list",
    method: "POST",
    data
  })
}

/**
 * @param data 创建图片生成事件
 * @returns
 */
export const AddDrawingPriceData = (data: any) => {
  return request<any>({
    url: "/image/add",
    method: "POST",
    data
  })
}

/**
 * @param data 删除图片
 * @returns
 */
export const DeleteDrawingPrice = (data: { id: number }) => {
  return request<any>({
    url: "/image/del",
    method: "POST",
    data
  })
}

/**
 * @param data 获取随机示例
 * @returns
 */
export const GetRandomValueInfo = () => {
  return request<any>({
    url: "/image/get_info",
    method: "GET"
  })
}

/**
 * @param data 图片的按钮事件
 * @returns
 */
export const AddImagesButton = (data: { id: number; button: string }) => {
  return request<any>({
    url: "/image/add_button",
    method: "POST",
    data
  })
}

/**
 * @param data 发布到广场
 * @returns
 */
export const PostToTheSquare = (data: { id: number }) => {
  return request<any>({
    url: "/image/is_same",
    method: "POST",
    data
  })
}

/**
 * @param data 创建同款
 * @returns
 */
export const CreatedSame = (data: { id: number }) => {
  return request<any>({
    url: "/image/do_same",
    method: "POST",
    data
  })
}
